#include<bits/stdc++.h>
using namespace std;
int read(){
    char c=getchar();
    int x=0,k=1;
    while(c<'0'||c>'9'){
        if(c=='-') k=-1;
        c=getchar();
    }
    while(c>='0'&&c<='9'){
        x=x*10+c-'0';
        c=getchar();
    }
    return x*k;
}
int n,r[100001],ans;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();ans=n;
    for(int i=1;i<=n;i++) r[i]=read();
    sort(r+1,r+n+1,greater<int>());
    int it=2;
    for(int i=1;i<=n;i++){
        while((r[it]>=r[i]||it<=i)&&it<=n) it++;
        if(it>n) break;
        ans--;
        it++; 
    }
    printf("%d",ans);
    return 0;

}